{% extends "base.html" %}

{% block body %}

<ol class="breadcrumb">
  <li>管理</li>
  <li class="active">新建用户</li>
</ol>

<div class="page-header">
  <h2>新建用户</h2>
</div>

<div class="static_page">
  <h3  class="modal-header">新建用户</h3>
  <div class="modal-body">
    <form class="form-horizontal" role="form" action='/account/user_create' method="post">
      {% csrf_token %}
        <div class="row">
          <div class="col-sm-6 col-md-5">
              <p><strong>用户名 </strong><span class="fa fa-asterisk"></span></p>
              <input type="text" name="username" class="form-control" placeholder="" required autofocus>
              </br>
              <p><strong>邮箱</strong></p>
              <input type="text" name="email" class="form-control" placeholder="" autofocus>
              </br>
              <p><strong>角色 </strong><span class="fa fa-asterisk"></span></p>
              <select class="form-control" name="role">
                <option  selected="selected">用户</option>
                <option>管理员</option>
              </select>
              </br>
              <p><strong>密码 </strong><span class="fa fa-asterisk"></span></p>
              <input type="password" name="password" class="form-control" placeholder="" required>
              </br>
              <p><strong>重复密码 </strong><span class="fa fa-asterisk"></span></p>
              <input type="password" name="confirm_password" class="form-control" placeholder="" required>
              </br>
              <p><strong>描述</strong></p>
              <input type="text" name="description" class="form-control" placeholder="">
              </br>
              {% if message %}
                  <div class="alert alert-warning">{{ message }}</div>
              {% endif %}
              </br>
          </div>
          <div class="col-sm-6">
            <h3>描述:</h3>
            <p>创建一个新用户并设置相关属性</p>
          </div>
        </div>
      <div class="modal-footer"><button class="btn btn-primary" type="submit">提交</button></div>
  </form>
</div>
</div>
{% endblock %}